import request from '@/utils/request.js'
/**
 *
 * @param {Object} data {mobile: '', code: ''}
 */
export const login = data => request.post('/v1_0/authorizations', data)
/**
 *
 * @param {*Object} data {mobile: ''}
 */
export const sendMobileCode = data => request.get(`/v1_0/sms/codes/${data.mobile}`)
/**
 *
 * @param {*} data
 */
export const getUserInfo = data => request({
  method: 'GET',
  url: '/v1_0/user'
})

export const getUserChannels = data => request({
  method: 'GET',
  url: '/v1_0/user/channels'
})
